package org.jerrymouse.jsa4j.vfs.local;

import java.util.ArrayList;
import java.util.List;

import org.jerrymouse.jsa4j.vfs.FileObject;

public class LocalDirectory extends LocalFileObject {

	public LocalDirectory(FileObject basePath, String name) {
		super(basePath, name);
	}

	public LocalDirectory(String basePath) {
		super(basePath);
	}

	public List<FileObject> getChildren() {
		List<FileObject> fileObjects = new ArrayList<FileObject>();
		for (String files : file.list()) {
			fileObjects.add(new LocalFileObject(files));
		}
		return fileObjects;
	}

}
